package com.kid.keep.common;


/**
 * @Description session存储
 * @Author JOHN
 * @Create 2020-01-02
 * @Since 1.0.0
 */
public class SessionStore {
    private static final ThreadLocal<UserSubject> sessionThread = new ThreadLocal<>();

    public static void saveSessionUser(UserSubject userSubject) {
        sessionThread.set(userSubject);
    }

    public static UserSubject getSessionUser() {
        return sessionThread.get();
    }
}
